//---------------------------------------------------------------------------

#ifndef MainH
#define MainH
//---------------------------------------------------------------------------
#include <System.Classes.hpp>
#include <Vcl.Controls.hpp>
#include <Vcl.StdCtrls.hpp>
#include <Vcl.Forms.hpp>
#include <Data.DB.hpp>
#include <Data.Win.ADODB.hpp>
#include <System.DateUtils.hpp>
#include <iostream>
#include <fstream>
//---------------------------------------------------------------------------
class TGPS_Control : public TForm
{
__published:	// IDE-managed Components
	TADOConnection *conGPSBase;
	TADOQuery *qry1;
	TDataSource *ds1;
	TADOQuery *qry2;
	TADOQuery *qry3;
	TDataSource *ds2;
	TDataSource *ds3;
	TADOQuery *qry4;
	TDataSource *ds4;
	TADOQuery *qry5;
	TDataSource *ds5;
	TButton *btnStart;
	TButton *btnStop;
	TLabel *lbl1;
	void __fastcall FormShow(TObject *Sender);
	void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
	void __fastcall btnStartClick(TObject *Sender);
	void __fastcall btnStopClick(TObject *Sender);
private:	// User declarations
public:		// User declarations
	__fastcall TGPS_Control(TComponent* Owner);
	void __fastcall GetStopPoints();
	TSystemTime UTC;
	TDateTime dtUTC;
	TDate dRealDate;
	String sSTime, sRealDate;
	bool work;
	void __fastcall DataSelectInsert(String sRealDate, String sSTime, TDateTime dtUTC);
	int __fastcall ConvertCoordinates(String sCoord);
	String __fastcall ConvertDate(TDate dDate);
};
//---------------------------------------------------------------------------
extern PACKAGE TGPS_Control *GPS_Control;
//---------------------------------------------------------------------------
#endif
